<?php

/**
 * Created by PhpStorm.
 * User: wangg
 * Date: 2017/7/8 0008
 * Time: 16:34
 */
namespace app\common\validate;

use think\Validate;

class Question extends Validate
{
    protected $rule=[
        'qtype' =>'number|between:1,10',
        '__token__'=>'token',
        'content'=>'require',
        'uid'=>'require',

    ];
    protected $message=[
        'qtype.number' =>'题型格式错误',
        'qtype.between'=>'预料之外的题型',
        '__token__'=>'禁止重复提交',
        'uid'=>'非法用户',
        'content'=>'没有题目内容',
    ];
    protected $sence=[
        'add'=>['qtype','__token__','content','qa','uid'],
        'edit'=>['qtype','__token__','content','qa','uid'],
    ];
}